menubutton: Remove prelight state when button is deactivated
authorMichael Catanzaro <mcatanzaro@igalia.com>
Sun, 30 Apr 2017 18:26:13 +0000 (13:26 -0500)
committerTimm Bäder <mail@baedert.org>
Mon, 8 May 2017 14:03:33 +0000 (16:03 +0200)
If the button is deactivated, it should not appear to be hovered
anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=781992

gtk/gtkmenubutton.c

index 43e18a396ebea2e2a934aebb3b69daf56060e5e5..9a3d57235ee05f2245552c94cad8e60211555e70 100644 (file)
@@ -652,6 +652,7 @@ static gboolean
 menu_deactivate_cb (GtkMenuButton *menu_button)
 {
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (menu_button), FALSE);
+  gtk_widget_unset_state_flags (GTK_WIDGET (menu_button), GTK_STATE_FLAG_PRELIGHT);
 
   return TRUE;
 }